package com.fm.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.Date;

/**
 * 设备
 * Created by Administrator on 2018/7/30 0030.
 */
@Entity(name = "ul_equipment")
@NoArgsConstructor
@AllArgsConstructor
@Data
public class Equipment extends AbstractMyBatisEntity {
    /**
     *
     */
    @Id
    @GeneratedValue
    private Integer id;
    private String name;
    //产品ID
    private Integer productId;
    //状态
    private Integer status;
    //最后上线时间
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
    private Date lastUptime;
    //设备ip
    private String ip;
    //固件版本
    private String firmware;
    //创建时间
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
    private Date createTime;
    //激活时间
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
    private Date activateTime;
    //设备私钥
    private String deviceSecret;
    //用户id
    private Integer userId;

    @Transient
    private String productName;

    @Transient
    private String productKey;
}
